define(function(require, exports, module){
	var EventProxy = require("eventproxy");

	function CateActionBar(container) {
		this.container = container;

		this.init();
	}

	CateActionBar.prototype = $.extend(new EventProxy(), {
		init: function(){
			var _this = this;
			this.container.append('<a class="action" href="#" title="编辑" data-name="edit"><img src="images/icons/edit.png"  /></a>');
			this.container.append('<a class="action" href="#" title="删除" data-name="remove"><img src="images/icons/remove.png"  /></a>');

			this.container.append('<a class="action right" href="index.html" title="刷新" data-name="refresh"><img src="images/icons/refresh.png" /></a>');

			this.container.on("click", "a.action", function(){
				var name = $(this).data("name");
				_this.emit(name, _this);
			});
		}
	});

	return CateActionBar;
});